home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
k
/
kids7.dms
/
kids7.adf
/
CLIMB.AMOS
/
CLIMB.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1992-10-04
|
6KB
|
170 lines
Dim RVL(20),ANS(3)
Global COUNT,RVL(),ANS(),LIM,ANSWER,ROX,ROY,SEL,NAME$,SCORE,LEVEL,XX$,LAPS
STUP
Procedure STUP
ROX=0 : ROY=0 : ANSWER=0 : LIM=5 : COUNT=1 : Colour Back $70
STRIPPER
Randomize Timer : PHIL
Unpack 10 To 0 : Screen Display 0,120,34,, : Unpack 11 To 1 : Screen To Back : Get Fonts
For N=1 To 5 : Channel N To Bob N : Next N
Screen 0 : Double Buffer : FALL : RIGHTON
Screen 1 : Set Font 3 : Get Bob 3,0,0 To 233,46 : Screen 0 : Limit Mouse 424,179 To 426,292
For N=290 To 260 Step -2 : Bob 3,54,N,3 : Wait Vbl : Next N : Wait Vbl
Paste Bob 54,260,3 : Wait Vbl : Bob Off 3 : LAPS=Timer
ROCKERS
End Proc
Procedure FALL
X=-8
For M=1 To 3
For N=-40 To -20 Step 5 : Bob 2,X,N,1 : Sam Play 15,1,Abs(N)*120 : Wait 8 : Add X,4 : Next N
Next M
For N=-20 To 52 : Bob 2,X,N,1 : Wait Vbl : X=X+1 : Next N
Wait 8 : Sam Play 9,3,2000 : Wait 4 : Sam Play 6,1,2000
For N=0 To 40 : Screen Offset 0,N,N : Wait Vbl : Next N
A$="A 0,(1,25)(2,25)" : A$=A$+"L: M -20,0,20; P; M 0,-4,5; M 0,4,2; M 20,0,40; P; M 0,-4,5; M 0,4,2; J L"
Channel 2 To Bob 2 : Amal 2,A$ : Amal On 2
If LEVEL=1 Then Bob 7,160,50,8 Else Bob 7,160,50,9
End Proc
Procedure RIGHTON
Unpack 11 To 1 : Screen To Back : SP=COUNT : TX=0
Screen 1 : Gr Writing 8 : Set Font 3
For N=1 To LIM
ST$=Str$(RVL(SP)) : If LIM=3 Then ST$=Str$(ANS(N))
ST$=ST$-" " : TT=Text Length(ST$) : RX=(45-TT)/2 : RX=RX+TX+4 : Inc SP
Set Text 2 : Ink 30 : Text RX-2,31,ST$ : Set Text 0 : Ink 3 : Text RX,30,ST$ : Add TX,45
Next N
End Proc
Procedure PHIL
For N=1 To 3 : ANS(N)=0 : Next N
If LEVEL=1 : For N=1 To 15 : RVL(N)=N : Next N : End If
If LEVEL=2
For N=1 To 5 : RVL(N)=Rnd(5)+1 : Next N
For N=6 To 9 : RVL(N)=RVL(N-5)+RVL(N-4) : Next N
For N=10 To 12 : RVL(N)=RVL(N-4)+RVL(N-3) : Next N
For N=13 To 14 : RVL(N)=RVL(N-3)+RVL(N-2) : Next N
RVL(15)=RVL(13)+RVL(14)
End If
If LEVEL=3
For N=1 To 5 : RVL(N)=Rnd(14)+1 : Next N
For N=6 To 9 : RVL(N)=RVL(N-5)+RVL(N-4) : Next N
For N=10 To 12 : RVL(N)=RVL(N-4)+RVL(N-3) : Next N
For N=13 To 14 : RVL(N)=RVL(N-3)+RVL(N-2) : Next N
RVL(15)=RVL(13)+RVL(14)
End If
End Proc
Procedure ROCKERS
ROX=76 : ROY=224 : COUNT=6
While COUNT<16
Repeat
For N=1 To 3
Repeat
T=Rnd(2)+1 : I=Rnd(1) : If I=0 Then T=T*-1
ANS(N)=RVL(COUNT)+T
Until ANS(N)>0
Next N
Until ANS(1)<>ANS(2) and ANS(1)<>ANS(3) and ANS(2)<>ANS(3)
T=Rnd(2)+1 : ANS(T)=RVL(COUNT) : ANSWER=T
GROCK
Wend
TUMBLE
End Proc
Procedure GROCK
LIM=3 : RIGHTON : TX=0 : BX=258 : Screen 0
A1$="L: M -10,0,80; P; M 10,0,80; P; J L"
A2$="L: M 10,0,80; P; M -10,0,80; P; J L"
A3$="L: M -5,0,50; P; M 5,0,50; P; J L"
For N=3 To 5
Get Bob 1,N,TX,0 To TX+46,47 : TX=TX+46
Next N
For N=3 To 5
For M=300 To BX Step -6
Bob N,320,M,N : Wait Vbl
Next M
BX=BX-44 : Sam Play 15,3,9000
Next N
Amal 3,A1$ : Amal On 3 : Amal 4,A2$ : Amal On 4 : Amal 5,A3$ : Amal On 5
Repeat
MK=0 : SEL=0
If LEVEL>1
For N=1 To 4 : Bob 7,ROX+15,ROY+50,7 : Wait 10 : Sam Play 15,1,7000 : Bob Off 7 : Wait 5 : Next N
Else
Bob Off 7
End If
Repeat
MY=Y Screen(Y Mouse) : MK=Mouse Key
Until MK>0
If MY>177 and MY<222 Then SEL=3
If MY>222 and MY<263 Then SEL=2
If MY>263 and MY<306 Then SEL=1
Until MK>0 and SEL>0
Sam Play 6,1,15000
For N=3 To 5 : Amal Off N : Next N
For N=3 To 5
If SEL<>N-2
BLAST[N]
End If
Next N
If Y Bob(SEL+2)<260
For N=Y Bob(SEL+2) To 260 Step 4
Bob SEL+2,,N,SEL+2 : Wait Vbl
Next N
End If
For N=320 To ROX Step -4
Bob SEL+2,N,,SEL+2 : If N mod 2=0 Then Wait Vbl : Sam Play 15,3,17500
Next N
For N=260 To ROY Step -1
Bob SEL+2,,N,SEL+2 : If N mod 2=0 Then Wait Vbl : Sam Play 15,3,12000
Next N
If ANSWER=SEL
Paste Bob ROX,ROY,SEL+2 : Wait Vbl : Bob Off SEL+2 : SCORE=SCORE+5
Add ROX,46 : Inc COUNT
If COUNT=6
Add ROY,-37 : ROX=98
End If
If COUNT=10
Add ROY,-37 : ROX=100
End If
If COUNT=13
Add ROY,-37 : ROX=122
End If
If COUNT=15
Add ROY,-37 : ROX=144
End If
Else
BLAST[SEL+2]
SCORE=SCORE-10
End If
End Proc
Procedure BLAST[BOA]
X=X Bob(BOA) : Y=Y Bob(BOA)
Sam Play 15,2,8000
Bob BOA,X,Y+5,10 : Wait 6
Bob BOA,X,Y+10,10 : Wait 5
Bob BOA,X,Y+15,11 : Wait 4
Bob BOA,X,Y+20,11 : Wait 3
Bob BOA,X,Y+30,12 : Wait 2
Bob BOA,X,Y+40,12 : Wait Vbl
Bob Off BOA
End Proc
Procedure TUMBLE
X=160 : Amal Off 2
For N=85 To 269 Step 40
Bob 2,X,N,6 : Wait 16 : Add X,22
Next N
A1$="L: M 10,-40,30; M 10,40,30; J L" : Amal 2,A1$ : Amal On 2
Wait 200 : Dim STORE(31) : For N=0 To 31 : STORE(N)=Colour(N) : Next N : Amal Off : Bob Off
Fade 3,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,$BBB,
Colour Back $BBB : Wait 45 : Cls 21 : For N=0 To 31 : Colour N,STORE(N) : Next N : Amal Off : Wait 2 : Cls 21 : Set Font 3
Ink 14,21 : Box 59,59 To 369,289 : Ink 13, : Box 58,58 To 370,290 : Ink 14, : Box 57,57 To 371,291
Ink 4,21 : T=Timer-LAPS : T=15000-T : T=T/100 : SCORE=SCORE+T : Screen Close 1
Text 120,120,"That was quick!"
Text 75,150,"You have "+Str$(T)+" bonus points."
Text 75,190," Your score is "+Str$(SCORE)
A$=NAME$+"|"+Str$(LEVEL)+"/"+XX$+"\"+Str$(SCORE) : Command Line$=A$
Run "KIDS-7:CARDS.AMOS"
End Proc
Procedure STRIPPER
A$=Command Line$ : A=Instr(A$,"|") : B=Instr(A$,"/") : C=Instr(A$,"\") : L=Len(A$)
NAME$=Left$(A$,A-1) : L$=Mid$(A$,A+1,B-A-1) : LEVEL=Val(L$)
XX$=Mid$(A$,B+1,C-B-1) : S$=Right$(A$,L-C) : SCORE=Val(S$) : Mid$(XX$,1,1)="."
End Proc